{% extends 'inquire/base.html' %}

{% block title %}
    总资产展示区
{% endblock %}

{% block startbody %}
    <div class="container-fluid" style="margin: 30px 0 0">
        <div class="row">
            <div class="form-group col-md-3"></div>
            <form action='{% url "in:ind" %}'>
                <div class="form-group col-md-4">
                    <label for="exampleInputEmail1">资产查询:</label>
                    <select class="form-control" id="exampleInputEmail1" name="asset">
                        {% for id,name in asset_name %}
                            {% if asset == id %}
                                <option value='{{ id }}' selected>{{ name }}</option>
                            {% else %}
                                <option value='{{ id }}'>{{ name }}</option>
                            {% endif %}
                        {% endfor %}
                    </select>
                </div>
                <br>
                <div class="form-group col-md-2" style="margin-right: 25px;">
                    <button type="submit" class="btn btn-default">查询</button>
                </div>
            </form>
            <form action="{% url 'in:ind' %}">
                <div class="form-group col-md-2">
                    <button type="submit" class="btn btn-default" style="position:absolute;left: -170px">查询所有</button>
                </div>
            </form>
        </div>
    </div> <!-- /container -->
    <hr>
    <table class="table table-striped table-bordered table-hover" style="margin: 20px auto; width: 90%">
        <tr class="info">
            <th>物品</th>
            <th>总资产（数量）</th>
        </tr>
        {% for i,k in a.items %}
            <tr>
                <td>{{ i }}</td>
                <td>{{ k }}</td>
            </tr>
        {% empty %}
            <tr>
                <td colspan="7">暂 无 数 据</td>
            </tr>
        {% endfor %}
    </table>
{% endblock %}

